package com.atos.smp.dao.impl;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.atos.smp.beans.Process;
import com.atos.smp.beans.ProcessesAVGMapper;
import com.atos.smp.beans.Project;
import com.atos.smp.beans.SessionEvent;
import com.atos.smp.dao.ProcessDao;
import com.atos.smp.dao.SessionEventDao;

public class SessionEventDaoImpl extends HibernateDaoSupport implements
		SessionEventDao, Serializable {

	@Override
	public List<SessionEvent> findAllSessionEvent(String das) {
		List<SessionEvent> se = getHibernateTemplate().find("from SessionEvent");
		return se;
	}

	@Override
	public List<SessionEvent> findSessionEventByDay(String das, Date date) {
		List<SessionEvent> se = getHibernateTemplate().findByCriteria(
				DetachedCriteria.forClass(SessionEvent.class)
						.add(Restrictions.eq("date", date)));
		return se;
	}

	@Override
	public List<SessionEvent> findSessionEventBetweenDates(String das,
			Date dateDebut, Date DateFin) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<SessionEvent> findSessionEventByMounth(String das, int year,
			int mounth) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<SessionEvent> findSessionEventByYear(String das, int year) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<SessionEvent> findSessionEventByName(String das, SessionEvent se) {
		List<SessionEvent> list = getHibernateTemplate().findByCriteria(
				DetachedCriteria.forClass(SessionEvent.class)
						.add(Restrictions.eq("name", se)));
		return list;
	}

		
	
	



}
